<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>grid-template-columns、grid-template-rows</title>
    <style>
      body {
        margin: 0;
        padding: 20px;
      }
      .container {
        display: grid;
        height: 400px;
        grid-template-columns: repeat(4, 150px);
        grid-template-rows: repeat(3, 150px);
        grid-template-areas:
          "header header header header"
          "main main . sidebar"
          "footer footer footer footer";
      }

      .item-header {
        grid-area: header;
        background-color: orange;
      }

      .item-main {
        grid-area: main;
        background-color: blue;
      }

      .item-sidebar {
        grid-area: sidebar;
        background-color: red;
      }

      .item-footer {
        grid-area: footer;
        background-color: green;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="item-header"></div>
      <div class="item-main"></div>
      <div class="item-sidebar"></div>
      <div class="item-footer"></div>
    </div>
  </body>
</html>
